#ifndef CONNECTION_HPP
#define CONNECTION_HPP

#include <QWidget>
#include <QMessageBox>
#include <QGridLayout>
#include <QLabel>
#include <QLineEdit>
#include <QSpinBox>
#include <QPushButton>

#include "../../src/idmanager.hpp"

class Connection : public QWidget
{
    Q_OBJECT

public:
    Connection(QWidget * parent = 0);

private:
    QLabel *_labelPort, *_labelIP, *_labelPseudo, *_labelPassword;
    QLineEdit *_IP, * _pseudo, *_password;
    QGridLayout * _layout;
    QSpinBox * _port;
    QPushButton * _button;

public:
    quint16 port();
    QString hash();
    QString pseudo();

signals:
    void connection(const QString &, quint16);

private slots:
    void reactClick();

public slots:
    void debloquerBouton();
};

#endif // CONNECTION_HPP
